package com.event.common.constant;

import java.util.HashSet;
import java.util.Set;

import lombok.AllArgsConstructor;
import lombok.Getter;

public class DataType {

    @Getter
    @AllArgsConstructor
    public enum TimeType{

        TIMESTAMP("timestamp"),

        DATETIME("datetime"),

        DATE("date"),

        TIME("time"),

        YEAR("year");

        private String name;

        public static boolean isDateTime(String dataType){
            if(convertDateType().contains(dataType)){
                return true;
            }
            return false;
        }

        private static Set<String> convertDateType(){
            Set<String> set = new HashSet<>();
            set.add(TIMESTAMP.getName());
            set.add(DATETIME.getName());
            set.add(DATE.getName());
            return set;
        }
    }

}
